﻿#include "mainwindow.h"

#include <QApplication>
#include "pdflib.h"
#include <climits>
#include <QTextCodec>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF8"));

//    PDF *p;
//     int font;

//     p = PDF_new();

//     /* open new PDF file */
//     if (PDF_open_file(p, "hello_c.pdf") == -1) {
//     fprintf(stderr, "Error: cannot open PDF file hello_c.pdf.\n");
//     exit(2);
//     }

//     PDF_set_info(p, "Creator", "hello.c");
//     PDF_set_info(p, "Author", "Thomas Merz");
//     PDF_set_info(p, "Title", "Hello, Gary!");

//     PDF_begin_page(p, a4_width, a4_height);	/* start a new page	*/

//     font = PDF_findfont(p, "Helvetica-Bold", "host", 0);

//     PDF_setfont(p, font, 24);
//     PDF_set_text_pos(p, 50, 500);
//     PDF_show(p, "Hello, 中午好!");
//     PDF_continue_text(p, "(says C)");
//     PDF_end_page(p);				/* close page		*/

//     PDF_close(p);				/* close PDF document	*/

//     PDF_delete(p);


    MainWindow w;
    w.show();
    return a.exec();
}
